
public class List implements Comparable<List> {
	private Tacka tac;
	private double pocetak, kraj;
	
	public List(Tacka tac) {
		super();
		this.tac = tac;
		pocetak = 0.0;
		kraj = 1500;
	}
	public List(Tacka tac, double pocetak, double kraj) {
		super();
		this.tac = tac;
		this.pocetak = pocetak;
		this.kraj = kraj;
	}
	public Tacka getTac() {
		return tac;
	}
	public void setTac(Tacka tac) {
		this.tac = tac;
	}
	public double getPocetak() {
		return pocetak;
	}
	public void setPocetak(double pocetak) {
		this.pocetak = pocetak;
	}
	public double getKraj() {
		return kraj;
	}
	public void setKraj(double kraj) {
		this.kraj = kraj;
	}
	
	public int compareTo(List l) {
		if (tac.getX() >= l.getTac().getX()) return 1;
		if (tac.getX() < l.getTac().getX()) return -1;
		return 0;
	}
	
}
